<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:cc="http://java.sun.com/jsf/composite">

    <h:head>
	<title>This content will not be displayed</title>
    </h:head>

    <h:body>

	<cc:interface>
	    <cc:attribute name="tableId" required="true" />
	    <cc:attribute name="value" required="true" />
	    <cc:attribute name="listSize" required="true" />
	</cc:interface>

	<cc:implementation>

	    <div class="dataTable">
		<p:dataTable id="#{cc.attrs.tableId}" styleClass="dcListe"
			     value="#{cc.attrs.value}" var="proj" rows="#{cc.attrs.listSize}"
			     paginator="true" paginatorPosition="bottom">
		    
		    <p:column sortBy="#{proj.name}">
			<f:facet name="header"><h:outputText value="#{msg.proCreationNom}" /></f:facet>
			<h:outputText value="#{proj.name}" />
		    </p:column>
		    <p:column sortBy="#{proj.craCode}">
			<f:facet name="header"><h:outputText value="#{msg.proCreationCodeCRA}" /></f:facet>
			<h:outputText value="#{proj.craCode}" />
		    </p:column>
		    
		    <!-- additional columns if needed -->
		    <ui:insert />

		    <p:column>
			<f:facet name="header"><h:outputText value="#{msg.dclListeDetails}" /></f:facet>
			<h:commandButton value="#{msg.dclListeDetails}" action="PRO_DETAILS"
					 styleClass="button">
			    <f:setPropertyActionListener target="#{sess.selectedProject}" value="#{proj}"/>
			</h:commandButton>
		    </p:column>
		</p:dataTable>
	    </div>

	</cc:implementation>

    </h:body>
    
    

</html>